<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<include file="Widget/head" />
	<link rel="stylesheet" href="__PUBLIC__/font-awesome-4.4.0/css/font-awesome.min.css" />
	<script type="text/javascript">
	function login(form) {
		$("body").easyMask('show');
		$.ajax({
			cache: false,
			type:  "post",
			url: "{:U('login')}",
			data: $(form).serializeArray(),
			async: false, //同步请求, 其它操作必须等待请求完成才可以执行
			success: function(dd) {
				$("body").easyMask('hide');
				if (dd.status == 1) {
					//成功
					window.location.href = dd.url
				}else {
					//$("#error").fadeIn();
					$.messager.alert('',dd.info,'error');
					/*
					$.messager.show({
						title:'失败',
						msg: dd.info,
						timeout: 2000,
						showType:'slide',
						style:{
							right:'',
							top:document.body.scrollTop+document.documentElement.scrollTop,
							bottom:''
						}
					});
					*/
				}
			}
		});
		/*
		$(this).form('submit',{
			success: function(dd){
				dd = JSON.parse(dd);
				$("body").easyMask('hide');
				if (dd.status) {
					window.location.href="{:U('Index/index')}"; 
				}else {
					$.messager.alert('','asdasd','error');
				}
			}
		});*/
		return false;
	}
	</script>
</head>

<body class="login-body">

<div class="login-container">
	<h1>
		<span>刷单平台管理中心</span>
	</h1>
	<div class="login-box">
		<div class="header">
			<i class="fa fa-key green"></i>
			请输入您的登录信息
		</div>
		<form action="{:U('login')}" method="post" onsubmit="return login(this);">
			<div class="form-row">
				<div class="input-group">
					<input name="account" type="text" class="form-control" placeholder="用户名">
					<i class="fa fa-user"></i>
				</div>
			</div>
			<div class="form-row">
				<div class="input-group">
					<input name="password" type="password" class="form-control" placeholder="密码">
					<i class="fa fa-lock"></i>
				</div>
			</div>
			<div class="form-submit">
				<button type="submit" class="btn">
					<i class="fa fa-key"></i>
					<span>登录</span>
				</button>
			</div>
		</form>
	</div>
</div>

</body>
</html>